home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 98
/
Skunkware 98.iso
/
src
/
mail
/
pine3.96.tar.gz
/
pine3.96.tar
/
pine3.96
/
pine
/
osdep
/
lstcmpnt.dos
< prev
next >
Wrap
Text File
|
1996-04-26
|
540b
|
26 lines
/*----------------------------------------------------------------------
Return pointer to last component of pathname.
Args: filename -- The pathname.
Result: Returned pointer points to last component in the input argument.
----*/
char *
last_cmpnt(filename)
char *filename;
{
register char *p = NULL, *q = filename;
while(q = strchr(q, '\\'))
if(*++q)
p = q;
if(!p && isalpha((unsigned char)*filename)
&& *(filename+1) == ':' && *(filename+2))
p = filename + 2;
return(p);
}